﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace Keleyi.Com.KWeb
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");


            routes.IgnoreRoute("message/{*pathInfo}");
            routes.IgnoreRoute("messageadmin/{*pathInfo}");
            routes.MapRoute(
                name: "messagecreate",
                url: "guestbook/add/",
                defaults: new { controller = "Message", action = "Create" }
            );

            routes.MapRoute(
               name: "GuestBookAdmin",
               url: "admin/guestbook/",
               defaults: new { controller = "MessageAdmin", action = "Index" }
           );

            routes.MapRoute(
               name: "GuestBookAdminTurnIsShow",
               url: "admin/guestbook/turnisshow/",
               defaults: new { controller = "MessageAdmin", action = "TurnIsShow" }
           );

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );

            
        }
    }
}